package com.smh.a02ThreadDemo2;

public class ThreadDemo2 {
    public static void main(String[] args) {
        //第二种方法
//        实现Runnable接口,重写run方法
        //(第二种可以腾出继承位置)
        MyRun myRun = new MyRun();
        Thread thread = new Thread(myRun);
        thread.setName("asd");
        thread.start();
        Thread thread2 = new Thread(myRun);
        thread2.setName("zxc");
        thread2.start();


    }
}
